//
//  RecommendModel.m
//  MarianasTrench
//
//  Created by 付建国 on 16/3/17.
//  Copyright © 2016年 王爵. All rights reserved.
//

#import "RecommendModel.h"
#import "ListModel.h"

@implementation RecommendModel

- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"list"]) {
        NSMutableArray *arr = [NSMutableArray array];
        
        for (NSDictionary *dic in value) {
            ListModel *model = [[ListModel alloc] init];
            [model setValuesForKeysWithDictionary:dic];
            
            [arr addObject:model];
            
            self.list = [NSArray arrayWithArray:arr];
        }
    }
}

@end
